package com.ziyun.erp.modules.craftConfig.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.craftConfig.dao.GoodsCraftConfigDao;
import com.ziyun.erp.modules.craftConfig.entity.GoodsCraftConfigEntity;
import com.ziyun.erp.modules.craftConfig.service.GoodsCraftConfigService;


@Service("goodsCraftConfigService")
public class GoodsCraftConfigServiceImpl extends ServiceImpl<GoodsCraftConfigDao, GoodsCraftConfigEntity> implements GoodsCraftConfigService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<GoodsCraftConfigEntity> page = this.selectPage(
                new Query<GoodsCraftConfigEntity>(params).getPage(),
                new EntityWrapper<GoodsCraftConfigEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public PageUtils queryQuotePage(Map<String, Object> params) {
        Page page = new Query<GoodsCraftConfigEntity>(params).getPage();
        List<GoodsCraftConfigEntity> list = this.baseMapper.queryQuoteList(page, params);
        page.setRecords(list);
        return new PageUtils(page);
    }

    @Override
    public PageUtils queryStandardPage(Map<String, Object> params) {
        Page page = new Query<GoodsCraftConfigEntity>(params).getPage();
        List<GoodsCraftConfigEntity> list = this.baseMapper.queryStandardList(page, params);
        page.setRecords(list);
        return new PageUtils(page);
    }

}
